package com.ruoyi.maode.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * 零部件批次实体类
 * @author zhangwenqiang
 */
@Data
@Accessors(chain = true)
@TableName("part_batch")
@ApiModel(value = "PartBatch对象", description = "零部批次表")
public class PartBatch {

    @ApiModelProperty("零件批次序号")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("批次号")
    @Pattern(regexp = "^[A-Za-z0-9]+$", message = "批次号只能包含字母和数字")
    private String batchCode;

    @ApiModelProperty("零件ID")
    private Long partId;

    @ApiModelProperty("供应商ID")
    private Long supplierId;

    @ApiModelProperty("毛坯厂家ID")
    private Long roughSupplierId;

    @ApiModelProperty("来货总数")
    private String total;

    @ApiModelProperty("类型，0-样件，1-批量，2-量产")
    private Integer type;

    @ApiModelProperty("批次状态，0-待检，1-检测中，2-已检")
    private Integer status;

    @ApiModelProperty("审批结果,0-不合格,1-合格，2-检测中")
    private Integer result;

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;


}
